package lanQiao;

import java.util.*;

public class FindNum
{
	public static void main(String[] args)
	{
		Scanner s = new Scanner(System.in);

		s.nextLine();
		String[] t=s.nextLine().split(" ");
		String m=s.next();
		for (int i=0; i<t.length; i++)
		{
			if (t[i].equals(m))
			{
				System.out.println(i+1);
				return;
			}
		}
		System.out.println(-1);
	}
}
